dojo.provide("com.otupia.userInfo");

com.otupia.userInfo = {
	name : "com.otupia.userInfo",
	initSuccessed : false,
	init : function(data){
		if(!data || !data.id)
		{
			throw {
				message : "User data is bad formated!",
				srcObject : this.name
			};
			return false;
		}
		
		this.data = data;
		this.initSuccessed = true;
	},
	getUserInfo:function()
	{
		if(this.initSuccessed)
		{
			return this.data;
		}
		else
		{
			return false;
		}
	}
};